package ro.isdc.navigator.professor.domain;

import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import ro.isdc.navigator.course.domain.Course;
import ro.isdc.navigator.misc.domain.Person;

/**
 * Professor class.
 * 
 * @author Andrei Chirila
 */
public class Professor extends Person {

	/**
	 * Generated Serial Version UID
	 */
	private static final long serialVersionUID = -1046961237773106925L;

	/**
	 * Years of experience
	 */
	private int yearsOfExperience;

	/**
	 * The courses to which the professor is owner.
	 */
	private List<Course> courses;

	/**
	 * @return the yearsOfExperience
	 */
	public int getYearsOfExperience() {
		return yearsOfExperience;
	}

	/**
	 * @param yearsOfExperience
	 *          the yearsOfExperience to set
	 */
	public void setYearsOfExperience(final int yearsOfExperience) {
		this.yearsOfExperience = yearsOfExperience;
	}

	/**
	 * @return the courses
	 */
	public List<Course> getCourses() {
		return courses;
	}

	/**
	 * @param courses
	 *          the courses to set
	 */
	public void setCourses(final List<Course> courses) {
		this.courses = courses;
	}

  /**
   * @see java.lang.Object#toString()
   */
  public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
        .appendSuper(super.toString()).append("courses", this.courses).append(
            "yearsOfExperience", this.yearsOfExperience).toString();
  }

}
